﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="XmlDataSourceTest.aspx.cs" Inherits="SCS.Web.UI.WebControls.Test.XmlDataSourceTest" %>

<%@ Register assembly="SCS.HierList" namespace="SCS.Web.UI.WebControls" tagprefix="cc1" %>
<%@ Register assembly="SCS.MenuExtender" namespace="SCS.Web.UI.WebControls" tagprefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>XmlDataSource Test</title>
    <link href="styles/main.css" rel="stylesheet" type="text/css" />
    <link href="styles/menu-v.css" rel="stylesheet" type="text/css" />
    <script src="scripts/jquery-1.5.2.min.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />

        <div>    
            Menu Type: 
            <asp:DropDownList ID="menuTypeSelect" runat="server" AutoPostBack="true">
                <asp:ListItem Value="H">Horizontal</asp:ListItem>
                <asp:ListItem Value="V">Vertical</asp:ListItem>
            </asp:DropDownList>

            <br />
            <br />

            <cc1:HierList ID="MediaOutline" runat="server" DataSourceID="xmlData">
                <DataBindings>                
                    <cc1:HierListItemBinding DataMember="Menu" TextField="text" NavigateUrlField="url" />
                    <cc1:HierListItemBinding DataMember="SubMenu" NavigateUrlField="url" TextField="text" ValueField="val" />
                </DataBindings>
            </cc1:HierList>

            <asp:XmlDataSource ID="xmlData" EnableCaching="false" DataFile="~/Resources/Media.xml" runat="server" />    

            <cc1:MenuExtender ID="MediaOutlineExtender" runat="server" 
                HideDelaySeconds="1.2"
                TargetControlID="MediaOutline"
                MenuCssClass="menu-v" />
        </div>
    </form>
</body>
</html>
